<?php

namespace App\Http\Controllers;

use App\Models\Types;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\View;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
    public function __construct()
    {
        //标题
        View::share('title','云氧博客');
        //描述
        View::share('description','描述');
    }

    /**
     * @param string $title
     * @param string $desc
     * @param string $ps
     * @param string $url
     * @author Deann.wu
     * @name 模块阐述数据
     */
    public function modelElaborate($title="",$desc="",$ps="",$url=""){
        $model['title']=$title;
        $model['desc']=$desc;
        $model['ps']=$ps;
        $model['bg_img']=$url;
        View::share('model',$model);
    }
}
